#ifndef GROUPTREEITEM_H
#define GROUPTREEITEM_H

#include <QObject>
#include <QStringList>

class Category : public QObject
{
  Q_OBJECT
private:
  QStringList _names;

public:
  Category();
  Category(const QString& name);
  Category(const Category& base);
  Category(const Category& base, const QString& name);

  void Clear ();

  int GetNumberOfStages () const;
  const QString& GetBaseName () const;
  const QString& GetHeadName () const;
  const QString& GetStageName (int idx) const;
  QString GetFullName () const;
  QString GetExportName () const;

  void PopFront ();
  void RenameHead (const QString& name);
  bool FreeRename (const Category& from, const Category& to);
  bool Rename (const Category& from, const Category& to);
  bool Remove (const Category& item);
  void SetFullName (const QString& name);

  void Add (const QString& name);
  Category& operator<< (const QString& name);
  Category& operator= (const Category& other);
  bool operator== (const Category& other);
  bool operator!= (const Category& other);

  Category CreateGroupTreeItem (unsigned numStages);

signals:
  void Changed ();
};

#endif // GROUPTREEITEM_H
